package com.sdkj.dspservice.common.utils;

import javax.servlet.http.HttpServletRequest;
import java.util.Enumeration;

/**
 * spring框架工具类
 */
public class SpringUtils {

    /**
     * 遍历header
     * @param request
     */
    public static void ergodicHeaders(HttpServletRequest request){
        Enumeration<String> headerNames = request.getHeaderNames();
        while (headerNames.hasMoreElements()){
            String headerName = (String) headerNames.nextElement();
            System.out.println("********************************" + headerName + " : " + request.getHeader(headerName) + "********************************");
        }
    }

}
